import { createRouter, createWebHistory } from 'vue-router'

let Login = () => import('@/views/login.vue')
let Layout = () => import('@/components/layout/index.vue')
let Dashboard = () => import('@/views/dashboard.vue')
let SheBeiXinXi = () => import('@/views/yunXingZhuangTai/sheBeiXinXi.vue')
let XiTongJianKong = () => import('@/views/yunXingZhuangTai/xiTongJianKong.vue')
let KongZhiQiZhuangTai = () => import('@/views/yunXingZhuangTai/kongZhiQiZhuangTai.vue')
let FuWuZhuangTai = () => import('@/views/yunXingZhuangTai/fuWuZhuangTai.vue')
let WangLuoJieKou = () => import('@/views/wangLuoSheZhi/wangLuoJieKou.vue')
let DnsSheZhi = () => import('@/views/wangLuoSheZhi/dnsSheZhi.vue')
let LuYouSheZhi = () => import('@/views/wangLuoSheZhi/luYouSheZhi.vue')
let RaidGuanLi = () => import('@/views/ciPanGuanLi/raidGuanLi.vue')
let CunChuChiGuanLi = () => import('@/views/ciPanGuanLi/cunChuChiGuanLi.vue')
let YongHuGuanLi = () => import('@/views/nasGuanLi/YongHuGuanLi.vue')
let FuWuGuanLi = () => import('@/views/nasGuanLi/FuWuGuanLi.vue')
let QuanXianGuanLi = () => import('@/views/nasGuanLi/quanXianGuanLi.vue')
let PeiEGuanLi = () => import('@/views/nasGuanLi/peiEGuanLi.vue')
let YuanChengFuZhi = () => import('@/views/nasGuanLi/yuanChengFuZhi.vue')
let IpSanGuanLi = () => import('@/views/sanGuanLi/ipSanGuanLi.vue')
let FcSanGuanLi = () => import('@/views/sanGuanLi/fcSanGuanLi.vue')
let XiTongGongJu = () => import('@/views/xiTongGongJu/xiTongGongJu.vue')
let YouJianBaoJing = () => import('@/views/baoJingSheZhi/youJianBaoJing.vue')
let SnmpBaoJing = () => import('@/views/baoJingSheZhi/snmpBaoJing.vue')
let XiTongRiZhi = () => import('@/views/riZhiGuanLi/xiTongRiZhi.vue')
let BaoJingRiZhi = () => import('@/views/riZhiGuanLi/baoJingRiZhi.vue')
let CaoZuoRiZhi = () => import('@/views/riZhiGuanLi/caoZuoRiZhi.vue')
let RiZhiShanChuCeLue = () => import('@/views/riZhiGuanLi/riZhiShanChuCeLue.vue')
let ShouQuanMiYao = () => import('@/views/shouQuanMiYao.vue')
let TongYiGuanLi = () => import('@/views/tongYiGuanLi/tongYiGuanLi.vue')

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      name: 'login',
      component: Login,
      meta: {
        title: 'Login'
      }
    },
    {
      path: '/shouQuanMiYao',
      name: 'shouQuanMiYao',
      component: ShouQuanMiYao,
      meta: {
        title: '授权密钥'
      }
    },
    {
      path: '/tongYiGuanLi',
      name: 'tongYiGuanLi',
      component: TongYiGuanLi,
      meta: {
        title: '统一管理'
      }
    },
    {
      path: '/haiying',
      name: 'haiying',
      component: Layout,
      meta: {
        title: '首页'
      },
      redirect: 'dashboard',
      children: [
        {
          path: 'dashboard',
          name: 'dashboard',
          component: Dashboard,
          meta: {
            title: '数据报表'
          }
        },
        {
          path: 'sheBeiXinXi',
          name: 'sheBeiXinXi',
          component: SheBeiXinXi,
          meta: {
            title: '设备信息'
          }
        },
        {
          path: 'xiTongJianKong',
          name: 'xiTongJianKong',
          component: XiTongJianKong,
          meta: {
            title: '系统监控'
          }
        },
        {
          path: 'kongZhiQiZhuangTai',
          name: 'kongZhiQiZhuangTai',
          component: KongZhiQiZhuangTai,
          meta: {
            title: '控制器状态'
          }
        },
        {
          path: 'fuWuZhuangTai',
          name: 'fuWuZhuangTai',
          component: FuWuZhuangTai,
          meta: {
            title: '服务状态'
          }
        },
        {
          path: 'wangLuoJieKou',
          name: 'wangLuoJieKou',
          component: WangLuoJieKou,
          meta: {
            title: '网络接口'
          }
        },
        {
          path: 'dnsSheZhi',
          name: 'dnsSheZhi',
          component: DnsSheZhi,
          meta: {
            title: 'DNS设置'
          }
        },
        {
          path: 'luYouSheZhi',
          name: 'luYouSheZhi',
          component: LuYouSheZhi,
          meta: {
            title: '路由设置'
          }
        },
        {
          path: 'raidGuanLi',
          name: 'raidGuanLi',
          component: RaidGuanLi,
          meta: {
            title: 'RAID管理'
          }
        },
        {
          path: 'cunChuChiGuanLi',
          name: 'cunChuChiGuanLi',
          component: CunChuChiGuanLi,
          meta: {
            title: '存储池管理'
          }
        },
        {
          path: 'yongHuGuanLi',
          name: 'yongHuGuanLi',
          component: YongHuGuanLi,
          meta: {
            title: '用户管理'
          }
        },
        {
          path: 'fuWuGuanLi',
          name: 'fuWuGuanLi',
          component: FuWuGuanLi,
          meta: {
            title: '服务管理'
          }
        },
        {
          path: 'quanXianGuanLi',
          name: 'quanXianGuanLi',
          component: QuanXianGuanLi,
          meta: {
            title: '权限管理'
          }
        },
        {
          path: 'peiEGuanLi',
          name: 'peiEGuanLi',
          component: PeiEGuanLi,
          meta: {
            title: '配额管理'
          }
        },
        {
          path: 'yuanChengFuZhi',
          name: 'yuanChengFuZhi',
          component: YuanChengFuZhi,
          meta: {
            title: '远程复制'
          }
        },
        {
          path: 'ipSanGuanLi',
          name: 'ipSanGuanLi',
          component: IpSanGuanLi,
          meta: {
            title: 'IPSAN管理'
          }
        },
        {
          path: 'fcSanGuanLi',
          name: 'fcSanGuanLi',
          component: FcSanGuanLi,
          meta: {
            title: 'FCSAN管理'
          }
        },

        {
          path: 'xiTongGongJu',
          name: 'xiTongGongJu',
          component: XiTongGongJu,
          meta: {
            title: '系统工具'
          }
        },
        {
          path: 'youJianBaoJing',
          name: 'youJianBaoJing',
          component: YouJianBaoJing,
          meta: {
            title: '邮件报警'
          }
        },
        {
          path: 'snmpBaoJing',
          name: 'snmpBaoJing',
          component: SnmpBaoJing,
          meta: {
            title: 'SNMP报警'
          }
        },
        {
          path: 'xiTongRiZhi',
          name: 'xiTongRiZhi',
          component: XiTongRiZhi,
          meta: {
            title: '系统日志'
          }
        },
        {
          path: 'baoJingRiZhi',
          name: 'baoJingRiZhi',
          component: BaoJingRiZhi,
          meta: {
            title: '报警日志'
          }
        },
        {
          path: 'caoZuoRiZhi',
          name: 'caoZuoRiZhi',
          component: CaoZuoRiZhi,
          meta: {
            title: '操作日志'
          }
        },
        {
          path: 'riZhiShanChuCeLue',
          name: 'riZhiShanChuCeLue',
          component: RiZhiShanChuCeLue,
          meta: {
            title: '日志删除策略'
          }
        }
      ]
    }
  ]
})

export default router
